//
//  TAMacro.h
//  TextApplication
//
//  Created by dllo on 16/8/26.
//  Copyright © 2016年 yh. All rights reserved.
//

#ifndef TAMacro_h
#define TAMacro_h
// 调试 打印
//#ifdef DEBUG
//#define NSLog(fmt, ...) NSLog((@"%s [Line %d] " fmt), __PRETTY_FUNCTION__, __LINE__, ##__VA_ARGS__);
//#else
//#define NSLog(...)
//#endif
#ifdef DEBUG
#define NSLog(fmt, ...) NSLog((@"%s [Line %d] " fmt), __PRETTY_FUNCTION__, __LINE__, ##__VA_ARGS__);
#else
#define NSLog(...)
#endif

#define IS_IPHONE           (UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPhone)
#define IS_IPHONE_4         (IS_IPHONE && [[UIScreen mainScreen] bounds].size.height == 480.0f)
#define IS_IPHONE_5         (IS_IPHONE && [[UIScreen mainScreen] bounds].size.height == 568.0f)
#define IS_IPHONE_5         (IS_IPHONE && [[UIScreen mainScreen] bounds].size.height == 568.0f)
#define IS_IPHONE_5_OR_HIGHER         (IS_IPHONE && [[UIScreen mainScreen] bounds].size.height >= 568.0f)
#define IS_IPHONE_6         (IS_IPHONE && [[UIScreen mainScreen] bounds].size.height == 667.0f)
#define IS_IPHONE_6_PLUS         (IS_IPHONE && [[UIScreen mainScreen] bounds].size.height == 736.0f)


#define SCREEN_RECT         [UIScreen mainScreen].bounds
#define SCREEN_SIZE         [UIScreen mainScreen].bounds.size
#define SCREEN_WIDTH        SCREEN_SIZE.width
#define SCREEN_HEIGHT       SCREEN_SIZE.height

#define WIDTH self.view.bounds.size.width
#define HEIGHT self.view.bounds.size.height

#define CONTENTVIEWWIDTH self.contentView.bounds.size.width
#define CONTENTVIEWHEIGHT self.contentView.bounds.size.height

#define RandomColor [UIColor colorWithRed:(random()%255)/255.0 green:(random()%255)/255.0 blue:(random()%255)/255.0 alpha:1]

#define CONTENTWIDTH self.contentView.bounds.size.width
#define CONTENTHEIGHT self.contentView.bounds.size.height

#endif /* TAMacro_h */
